package com.lufei.message_system.Data.UserVD;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
@Schema(name = "密码重置DTO")
public class PasswordResetDTO {
    @NotBlank(message = "旧密码不能为空")
    @Schema(description = "旧密码", requiredMode = RequiredMode.REQUIRED, example = "123456")
    private String oldPassword;

    @NotBlank(message = "新密码不能为空")
    @Size(min = 6, max = 20, message = "新密码长度必须在6到20之间")
    @Schema(description = "新密码", requiredMode = RequiredMode.REQUIRED, example = "654321")
    private String newPassword;
}